package com.example.controller;

import com.alibaba.fastjson.JSONObject;
import com.example.until.KafkaUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * ClassName: kafkaTestController
 * PackageName: com.example.controller
 * Describe:
 *
 * @author: Cheng Wenying
 * @Create: 2023/11/1
 * @version:
 */
//@Controller
public class kafkaTestController {
    @Autowired
    private KafkaUtils kafkaUtils;

    /**
     * 测试kafka消息
     *
     * @return
     */
    @GetMapping("/kafkaTest")
    public JSONObject kafkaTest() {
        kafkaUtils.kafkaSendMsg("test", "hello world！！！");
        return null;
    }
}
